

<div class="modal-dialog modal-lg">
  <div class="modal-content">
    <div class="modal-header">
      <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
      <h4 class="modal-title">{{'头像设置'|trans}}</h4>
    </div>
    <div class="modal-body">

      <form id="avatar-crop-form" method="post" action="{{ path('admin_user_avatar_crop', {id:user.id}) }}" >
       
        <div class="form-group clearfix">
          <div class="col-md-offset-2 col-md-8 controls">
            <img class="img-responsive" src="{{ filepath(pictureUrl) }}" id="avatar-crop" width="{{scaledSize.width}}" height="{{scaledSize.height}}" data-natural-width="{{ naturalSize.width }}" data-natural-height="{{ naturalSize.height }}" />
            <div class="help-block">{{'提示：请选择图片裁剪区域。'|trans}}</div>
          </div>
        </div>

        <div class="form-group clearfix">
          <div class="col-md-offset-2 col-md-8 controls">
            <a class="btn btn-fat btn-primary" 
            id="upload-avatar-btn" 
            data-url="{{path('admin_user_avatar_crop', {id: user.id})}}"
            data-goto-url="{{path('admin_user_avatar', {id: user.id})}}"
            >{{'保存'|trans}}</a>
          </div>
        </div>

        <input type="hidden" name="_csrf_token" value="{{ csrf_token('site') }}">
        
      </form>

    </div>
    <div class="modal-footer">  <button type="button" class="btn btn-link pull-right" data-dismiss="modal">{{'关闭'|trans}}</button>
      <script>app.load('user/avatar-crop-modal')</script>
    </div>
  </div>
</div>
